import axios from "axios"
/**
 * @type {import('vuex').Module}
 */
const cart = {
  namespaced: true,
  state: {
      list: []
  },
  mutations: {
    updataList(state,e) {
      state.list=e
      }
  },
  actions: {
    async getList(ctx) {
      const res1 = await axios.get('http://localhost:3000/todo')
      ctx.commit('updataList', res1.data)
      console.log(res1);
    }
  }
}
export default cart